import React from "react";
import {Route, Switch} from 'react-router-dom'
import Demo from '../pages/demo'
import Login from '../pages/auth/login'
import Main from '../pages/main'
import ProductDetail from '../pages/product/detail'
import Order from '../pages/order'
import OrderDetail from '../pages/order/detail'
import OrderCheckout from '../pages/order/checkout'
import OrderEvaluate from '../pages/order/evaluate'
import OrderPay from '../pages/order/pay'
import OrderPayResult from '../pages/order/pay/result'
import Coupon from '../pages/mine/coupon'
import Address from '../pages/mine/address'
import AddressManage from '../pages/mine/address/manage'
import Collect from '../pages/mine/collect'
import Browse from '../pages/mine/browse'
import OrderExpress from '../pages/order/express'

const Index: React.FC = () => {
    return (
        <Switch>

            <Route path={`/demo`} component={Demo}/>
            <Route path={`/auth/login`} component={Login}/>
            <Route exact path={`/`} component={Main}/>
            <Route exact path={`/product/:productId`} component={ProductDetail}/>
            <Route exact path={`/orders`} component={Order}/>
            <Route exact path={`/orders/:orderId`} component={OrderDetail}/>
            <Route exact path={`/orders/express/:orderId`} component={OrderExpress}/>
            <Route exact path={`/order/checkout`} component={OrderCheckout}/>
            <Route exact path={`/order/evaluate`} component={OrderEvaluate}/>
            <Route exact path={`/order/pay`} component={OrderPay}/>
            <Route exact path={`/order/pay/result`} component={OrderPayResult}/>
            <Route exact path={`/mine/coupons`} component={Coupon}/>
            <Route exact path={`/mine/addresses`} component={Address}/>
            <Route exact path={`/mine/addresses/:addrId`} component={AddressManage}/>
            <Route exact path={`/mine/collect`} component={Collect}/>
            <Route exact path={`/mine/browse`} component={Browse}/>

        </Switch>
    );
};
export default Index
